package com.goodluck.goodluckim.ui.msg.viewholder;

import android.widget.Toast;

import com.chad.library.adapter.base.BaseViewHolder;
import com.goodluck.goodluckim.R;
import com.goodluck.goodluckim.db.model.IMMessage;

/**
 * Created by wyj on 2018/9/10.
 */
public class MsgViewHolderImage extends MsgViewHolderBase {

    @Override
    protected int getContentLayoutId() {
        return R.layout.listitem_image_message;
    }

    @Override
    protected void bindContentView(BaseViewHolder helper, IMMessage data, int position) {
        helper.setImageResource(R.id.image_iv, R.drawable.brvah_sample_footer_loading);
    }

    @Override
    public void onClick(BaseViewHolder helper, IMMessage data, int position) {
        super.onClick(helper, data, position);
        Toast.makeText(mContext, "点击了消息:" + data.getMessageContent(), Toast.LENGTH_SHORT).show();
    }

    @Override
    protected int getLeftBackground() {
        return 0;
    }

    @Override
    protected int getRightBackground() {
        return 0;
    }
}
